package com.samehope.ar.service;

import com.samehope.ar.entity.SysUserCompany;
import com.baomidou.mybatisplus.extension.service.IService;
import com.samehope.ar.vo.CompanyDetailDataVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户公司 服务类
 * </p>
 *
 * @author Zhang Luo
 * @since 2019-12-23
 */
public interface ISysUserCompanyService extends IService<SysUserCompany> {

    /**
     * 根据企业和用户查找关系
     * @param companyId
     * @param userId
     * @return
     */
    SysUserCompany findByCompanyAndUser(Long companyId, Long userId);

    /**
     * 根据用户查找企业及相关管理员
     * @param userId
     * @return
     */
    List<CompanyDetailDataVO> getCompanyByUser(Long userId);
}
